home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / STPCPY.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  353 b   |  16 lines

  1. /* stpcpy.c From TC Bible page 273  Use stpcpy to copy one string to
  2. another.  It behanves just like strcpy but the return values are
  3. different */
  4.  
  5. #include <stdio.h>
  6. #include <string.h>
  7. main()
  8. {
  9.     char str1[80], str2[80];
  10.     printf("Enter a string: ");
  11.     gets(str2);
  12.     stpcpy(str1,str2);
  13.     printf("String copied.  Result is: %s\n", str1);
  14. }
  15.  
  16.